from uuid import UUID

from pydantic import BaseModel
from pydantic.networks import EmailStr


# 1. Auth ADT
class User(BaseModel):
    uuid: UUID | None = None
    username: str
    email: EmailStr
    password: str | None = None


class UserInDB(User):
    id: str | None = None
    hashed_password: str


class Admin(BaseModel):
    email: EmailStr
    password: str


# 2. Token ADT
class Token(BaseModel):
    access_token: str
    token_type: str


class TokenData(BaseModel):
    uuid: UUID | None = None
    username: str
    email: EmailStr
    password: str
